package com.chinasofti.io;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo02 {
    public static void main(String[] args) throws IOException {
        // FileOutputStream fos = new FileOutputStream("java419\\fos.txt");
        FileOutputStream fos = new FileOutputStream("java0419\\fos.txt",true);
        //写数据
        for(int i = 0;i<10;i++){
            fos.write("hello".getBytes());
            fos.write("\r\n".getBytes());
        }

        //关闭资源
        fos.close();
    }
}
